unit UTest;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, uOrderSettingsPanel, uOrderSettingsParser;

type
  TForm1 = class(TForm)
    Memo1: TMemo;
    Button1: TButton;
    OrderSettingsPanel1: TOrderSettingsPanel;
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
    OrderSettingsPack:TOrderSettingsParser;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
    OrderSettingsPack:=TOrderSettingsParser.Create;
    OrderSettingsPanel1.OnChanged:=OrderSettingsPack.ParseOrderSettings;
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
    OrderSettingsPack.Free;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
    Memo1.Lines.Add(OrderSettingsPack.getOrderSettingsAsString);
end;

end.
